Skip to content

Comments

Causes error on world gen without check#212

Open
hiilikewiki wants to merge 1 commit intoblushiemagic:1.4from
hiilikewiki:1.4
Open

Causes error on world gen without check#212
hiilikewiki wants to merge 1 commit intoblushiemagic:1.4from
hiilikewiki:1.4

Conversation

@hiilikewiki
Copy link

Receive index out of bounds on world gen due to no dedicated server check on this.

Comment on lines +24 to +25
if (Main.dedServ)
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this and instead override IsLoadingEnabled to return !Main.dedServ

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this and instead override IsLoadingEnabled to return !Main.dedServ

That's not overrided in the Edit class so I assumed the authors didn't want it this way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would Edit need to override it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So inheriting classes could implement it...?

Copy link
Contributor

@ExterminatorX99 ExterminatorX99 Sep 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IsLoadingEnabled is a virtual method on ILoadable
Edit implements ILoadable, therefore IsLoadingEnabled is available to override in Edit and classes that inherit from Edit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants